package com.mobile.clouree;

import android.content.SharedPreferences;

import com.adobe.fre.FREContext;
import com.adobe.fre.FREFunction;
import com.adobe.fre.FREObject;

public class AndroidAneSetNotifyType implements FREFunction {

	private final static String PRESS_NAME = "MessageTypeSettings";
	private final static String PRESS_KEY_WAKE = "MsgWake";
	@Override
	public FREObject call(FREContext arg0, FREObject[] arg1) {
		try {
			boolean isWake =  arg1[0].getAsBool();
			SharedPreferences settings = arg0.getActivity().getSharedPreferences(PRESS_NAME, 0);
			SharedPreferences.Editor editor = settings.edit();
			editor.putBoolean(PRESS_KEY_WAKE, isWake);
			editor.commit();
		}catch (Exception e) {
			
		}
		return null;
	}

}
